package com.xy.mainp.novel.fragment;

import android.databinding.DataBindingUtil;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.xy.debug.LogUtils;
import com.xy.mainp.NovelShowBinding;
import com.xy.mainp.R;
import com.xy.mainp.base.LazyFragment;
import com.xy.mainp.main.fragment.NovelFragment;
import com.xy.mainp.model.biqu.BiquCategoryEntity;
import com.xy.mainp.novel.widget.NovelFragmentHelper;
import com.xy.mainp.utils.NetRequestUtils;
import com.xy.net.OkHttpUtils;

import okhttp3.Request;

/**
 * Created by John on 2016/11/28.
 */

public class NovelShowFragment extends LazyFragment implements NovelFragmentHelper.NetDataListener {

    private BiquCategoryEntity entity;
    private NovelShowBinding binding;

    public NovelShowFragment(){

    }

    public NovelShowFragment(BiquCategoryEntity entity){
        this.entity = entity;
    }



    @Override
    protected void onShow() {
        super.onShow();
        NovelFragmentHelper.getInstance(getActivity()).LoadNetData(entity.getUrl());
    }



    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding =  DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.fragment_novel_show,null,false);
        setContentView(binding.getRoot());
        NovelFragmentHelper.getInstance(getActivity()).setNetDateListener(this);
    }


    @Override
    public void deal(String result) {
       // binding.tvCateEnd.setText(result);
    }
}
